<template>
    <div class="contents">   
        <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in datas" :key = 'item.id'>
					<router-link :to="'/home/newShow/'+item.id">
						<img class="mui-media-object mui-pull-left" :src="item.img_url">
						<div class="mui-media-body">
							<h4 >{{item.title}}</h4>   
                            <div>
							    <p class='mui-ellipsis'>{{item.zhaiyao}} <span>{{item.add_time|time("yyyy-mm-dd")}}</span></p>
                                <span>点击次数{{item.click}}</span>
                            </div>
						</div>
					</router-link>
				</li>
			</ul>
    </div>
</template>
<script>
    // const fs = require('fs')
    // const path = require('path')
    // fs.loadFile('','utf-8',function(err,success){

	// })
	import {Toast} from 'mint-ui'
	export default {
		data(){
			return {
				datas:null
			}
		},
		created(){
			this.getNewLidt()
		},
		methods : {
			getNewLidt (){
				this.$http.get(this.base_url+'vue/datas/new/newList.json','json').then(function(data){
					if(data.body.status == 0){
						this.datas = data.body.data
					}else{
						Toast('获取数据失败')
					}
				})
			}
		}
	}
</script>
<style scoped>
	.contents{
		padding-bottom: 52px;
	}
    .mui-media-body>div{
		display: flex;
        justify-content: space-between;

    }   
</style>

